NC Machining
Simulating numerically controlled (NC) machining is of fundamental importance in computer aided design (CAD), and computer aided manufacturing (CAM). During simulation, a computer model of a workpiece is edited with a computer representation of an NC machining tool and a set of NC machining tool motions to simulate the machining process.
The workpiece model and tool representation can be visualized during the simulation to detect potential collisions between parts, such as the workpiece and a tool holder, and after the simulation to verify a final shape of the workpiece.
The final shape of the workpiece is affected by the selection of the tool and tool motions. Instructions for controlling these motions are typically generated using a computer aided manufacturing system from a graphical representation of the desired final shape of the workpiece. The motions are typically implemented using numerical control programming language, also known as preparatory code or G-Codes, see the following standards RS274D and DIN 66025/ISO 6983.
The G-Codes generated by the CAM system may not produce an exact replication of the desired shape. In addition, the movement of the NC tool is governed by motors used for the NC machining, which have limited speeds, ranges of motion, and abilities to accelerate and decelerate, so that the actual tool motions may not exactly follow the NC machine instructions.
Discrepancies between the actual final shape of the workpiece and the desired shape of the workpiece may be very small. In some situations, these discrepancies can result in undesirable gouges or nicks in the surface of the final shape of the workpiece with sizes on the order of a few micrometers in depth and width, and tens of micrometers in length.
Typically, a set of NC machining instructions is tested by machining a test workpiece made of softer, less expensive material prior to machining the desired part. If visual inspection of the test workpiece locates undesirable discrepancies in the test workpiece, the NC machine instructions can be modified accordingly.
This manual testing is time consuming and expensive. Time for machining a single test workpiece may be on the order of hours and several iterations may be required before an acceptable set of NC machine instructions is attained. Thus, it is desirable to test for these discrepancies using computer-based simulation and rendering.
The machining instructions needed to produce large and/or complex work pieces are time consuming to simulate. Thus, it can be useful to be able to undo the simulated effects of a set of the machining instructions containing a defect and to replace them with an alternate set of the machining instructions that are free of defects. Furthermore, being able quickly undo to any arbitrary the machining instruction within the set of machining instructions enables locating the machining instruction responsible for the simulated defect. Therefore it can be desirable to have a capability to undo the simulated machining operations.
The conventional solutions provide only for sequential undo/redo operations, i.e., one change or operation at the time repeated as many times as necessary. However, the simulation of the machining can include millions of operations, and sequential undo/redo operations can be slow and inefficient. For example, a method described in U.S. 2010/0050188 stores a starting point of representation and a history of the changes to a representation. In order to undo back to a certain step, the starting point is reloaded and the steps in the history are re-applied until the desired step is reached. That solution is not suitable for large machining simulation programs, as it results in many files that need to be stored. Also, that method provides only for continuous, i.e., sequential, undo operations.
Accordingly, it is desired to provide rapid undo/redo operations of the simulation of the machining of the object. Making undo/redo operations rapid allows independent analysis of various stages of the machining.